cmake_minimum_required(VERSION 3.10)
project(AsioTest)

SET(CMAKE_EXE_LINKER_FLAGS     "${CMAKE_EXE_LINKER_FLAGS} /level='requireAdministrator' /uiAccess='false'")
set(CMAKE_CXX_STANDARD 17)

set(PLATFORM ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID})
message(${CMAKE_CXX_COMPILER})

set(OUTPUT_DIR ${CMAKE_SOURCE_DIR}/build/${PLATFORM}/$<CONFIG>/)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR}/Bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_DIR}/Bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIR}/Lib)
set(CMAKE_INSTALL_PREFIX ${OUTPUT_DIR})

set(CMAKE_DEBUG_POSTFIX d)

set(LIBS_DIR ${CMAKE_SOURCE_DIR}/libs)

if (MSVC)
    include(${CMAKE_SOURCE_DIR}/cmake/msvc.cmake)
endif ()

include(${CMAKE_SOURCE_DIR}/cmake/boost.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/hiredis.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/sqlite3.cmake)

add_subdirectory(code)
add_subdirectory(server)